﻿<%@ Control Language="C#"  %>
<%@ Register src="../module/Admincenter-Comment-Reply.ascx" tagname="Reply" tagprefix="inal" %>
<%@ Register src="../module/Admincenter-Public-Approved.ascx" tagname="Approved" tagprefix="inal" %>
<script runat="server">
    
    protected void Page_Load(object sender, EventArgs e)
    {
        Item_Lang = Utils.GetQueryString("lang", 1);
        Item_Typ = Utils.GetQueryString("typ", 0);
        Comments comments = new Comments();
        Repeater_List.DataSource = comments.List_Comment(Item_Typ, Top_Size, Item_Lang);
        Repeater_List.DataBind();
    }
    private int lang = 1;
    public int Item_Lang
    {
        get { return lang; }
        set { lang = value; }
    }
    private int Top_size = 20;
    public int Top_Size
    {
        get { return Top_size; }
        set { Top_size = value; }
    }
    private int Item_typ = 0;
    public int Item_Typ
    {
        get { return Item_typ; }
        set { Item_typ = value; }
    }
    
</script>
<table class="datas">
<thead>
    <tr>
    <td width="80"> </td>
    <td class="w50">Num</td>
    <td><%=Lang.Show("Title")%></td>
    <td><%=Lang.Show("Columns")%></td>
    <td><%=Lang.Show("Order")%></td>
    <td><%=Lang.Show("Published")%></td>
    <td><%=Lang.Show("Create_Time")%></td>
    <td></td>
    <td class="Narrow"></td>
    <td class="Narrow"></td>
    <td class="Narrow"></td>
    </tr>
</thead>
<tbody>
<asp:Repeater runat="server" ID="Repeater_List">
<ItemTemplate>
    <tr id="TR<%#Eval("Item_Id") %>">
        <td><inal:Approved runat="server" Item_Id='<%#Utils.ToInt(Container.DataItem,"Item_Id") %>' Item_Status='<%#Utils.ToInt(Container.DataItem,"Item_Status") %>' Item_Typ="4" /></td>
        <td><code>.<%#Eval("Item_Id")%>  </code></td>
        <td><%#Eval("Item_User")%></td>
        <td><%#Eval("Item_Tel")%></td>
        <td><%#Eval("Item_Content")%></td>
        <td><code><%#Eval("Item_Time", "{0:yyyy/MM/dd<br>HH-mm-ss}")%></code></td>
        <td><code><%#Eval("Create_Time", "{0:yyyy/MM/dd<br>HH-mm-ss}")%></code></td>
        <td></td>
        <td><a href="Reply_Edit.aspx?id=<%#Eval("Item_Id")%>"><%=Lang.Show("Edit")%></a></td>
         <td><a href="Reply_Add.aspx?id=<%#Eval("Item_Id")%>&lang=<%=Item_Lang %>"><%=Lang.Show("Comment")%></a></td>
        <td><a href="javascript:Del(<%#Eval("Item_Id") %>,4)" class="del"><%=Lang.Show("Del") %></a></td>
    </tr>
    <inal:Reply  runat="server" Item_Reply='<%#Eval("Item_Id")%>' />
    
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>